<?php
require_once '../../include/common.inc.php';
require_once '../function.php';

if(stripos(auth_group($_SESSION['login_gid']),'users_admin')===false)exit("没有权限！");
if($act=="user_edit"){
	user_edit($id,$realname,$password,$phone,$gid,$fuser,$tuser,$sn,$state,$nickname,$rbnum,$diamond);
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../assets/css/dpl-min.css" rel="stylesheet" type="text/css" />
<link href="../assets/css/bui-min.css" rel="stylesheet" type="text/css" />
<link href="../assets/css/page-min.css" rel="stylesheet" type="text/css" />
<!-- 下面的样式，仅是为了显示代码，而不应该在项目中使用-->
<link href="../assets/css/prettify.css" rel="stylesheet" type="text/css" />
<style type="text/css">
code { padding: 0px 4px; color: #d14; background-color: #f7f7f9; border: 1px solid #e1e1e8; }
input,select{vertical-align:middle;}
.liw { width:160px; height:25px; line-height:25px;}
</style>
</head>
<body>
<div class="container" style="margin-bottom:50px;">
<?php
$query=$db->query("select * from {$tablepre}auth_group order by id desc");
while($row=$db->fetch_row($query)){
	$group.='<option value="'.$row[id].'">GID:'.$row[id].'-'.$row[title].'</option>';
}
if(stripos(auth_group($_SESSION['login_gid']),'users_group')===false){
	$group='';
}



$str = '
<div id="kickmp" onselectstart="return true;"><select name="MCmd" id="MCmd" ><option value="kick">踢出</option></select>&nbsp;<select id="ktime" name="ktime">      <option value="0">踢出房间</option>      <option value="1">禁闭01分钟</option>      <option value="10">禁闭10分钟</option>      <option value="30">禁闭30分钟</option>      <option value="60">禁闭60分钟</option>      <option value="720">禁闭12小时</option>      <option value="10080">禁闭1星期</option><option value="14515200">永久禁闭</option></select><br><br><input type="text" name="cause" id="cause" value="未知" size="24"><br><button class="bt1" onclick="Mkick()">执行</button></div>

<input type="hidden" value="{username}" id="realname">
<input type="hidden" value="'.$tid.'" id="tid">
<input type="hidden" value="'.$id.'" id="uid">
<script >
function Mkick()
{
    var ktime = $("#ktime").val();
    var realname = $("#realname").val();
    var cause = $("#cause").val();
    var tid = $("#tid").val();
    var uid = $("#uid").val();
    
    
   

    
    $.ajax({type: "get", dataType: "json", url: "../../ajax.php?act=kick&aid=" + 1 + "&tid=" + uid + "&uid=" + tid + "&rid=" + 1 + "&ktime=" + ktime + "&cause=" + encodeURIComponent(cause) + "&u=" + encodeURIComponent(realname) + "&" + Math.random() * 10000,
        success: function(data) {
//            alert(data);
            if(data.state == "yes"){
                alert("操作成功");
            }
        }
    });
}
</script>
';


echo userinfo($id,$str)?>
</div>
<script type="text/javascript" src="../assets/js/jquery-1.8.1.min.js"></script> 
<script type="text/javascript" src="../assets/js/bui.js"></script> 
<script type="text/javascript" src="../assets/js/config.js"></script> 
<script type="text/javascript" src="../../upload/swfupload/swfupload.js"></script> 
<script>

</script>
</body>
</html>
